Rules Manager for WPF | ComponentOne
In This Topic
    Working With Rules
    In This Topic

    Rules Manager allows users to format data using the conditional formatting rules to highlight values based on conditions and visualize data by using data bars, color scales, and icon sets that correspond to certain variations in the data. Each rule instance has its own properties, which specify the condition or formula that determines when the rule should be applied. To define the visual appearance of the formatted cells, the C1RulesEngineStyle tag is used. This allows the customization of style attributes such as background color, foreground color, and icons.

    Color Scale Rule

    Color scale rule is defined by a collection of color stops. Based on the value of the item being evaluated and the color stops, the rule applies a style with a background color that is interpolated according to the value. As a result, each item’s style varies from each other, providing a value-based visual representation. It also displays a range of presets with common standard colors and a zone to specify the values that determine the applied background from the scale.

     

     

    Data Bar Rule

    Data-bar rule causes the items to show a visual bar indicating the value of the item. It has a list of presets and a section to specify the values used to calculate the length of the bar and the color of the bar. 

     

     

    Expression Rule

    Expressions rules evaluate a Boolean condition for each item in the given set of data. When the condition is set to true, the style gets applied to the item. The style is specified within the rule and is applied consistently to all the items that meet the condition. 

     

     

    Segments Rule

    The segments rule defines a series of segments, and every segment has a style, depending on the value of the item the corresponding segment is taken, and its style is applied to the item. This rule can be used to display icons depending on the value, but at the same time can be used to paint the background with static brushes (unlike color-state rule, which interpolates the colors). 

     

     

    Custom Rule

    The Custom Rule is designed for advanced use cases, allowing developers to create their own rules using arbitrary code.